from selenium.webdriver.common.by import By

from base import Base


#方法调用
class Page(Base):
    #步骤1
    def sou1(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().resourceId("com.achievo.vipshop:id/index_search_icon")')
        ele=self.find_ele(loc)
        return ele

    # 步骤2
    def shuru2(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele

    # 步骤3
    def dianji3(self):
        loc=(By.ID,'com.achievo.vipshop:id/tv_search')
        ele=self.find_ele(loc)
        return ele

    # 步骤4
    def dian4(self):
        loc=(By.XPATH,'(//android.widget.RelativeLayout[@resource-id="com.achievo.vipshop:id/image_main_layout"])[1]/android.widget.FrameLayout')
        ele=self.find_ele(loc)
        return ele

    # 步骤5
    def djsc5(self):
        loc=(By.ID,'com.achievo.vipshop:id/img')
        ele=self.find_ele(loc)
        return ele
    def dy(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搭配")')
        ele=self.find_ele(loc)
        return ele

    # 步骤6
    # def d6(self):
    #     loc=(By.ID,'com.achievo.vipshop:id/btn_round_back_icon')
    #     ele=self.find_ele(loc)
    #     return ele